<?php
/**
 * This file is part of the Agora distribution. 
 * Detailed copyright and licensing information can be found
 * in the gpl-3.0.txt file which should be included in the distribution.
 * 
 * @version		$Id: 3.0.14 Olympus 2010-09-28 rammstein4o $
 * @copyright  2007 - 2010 jVitals
 * @license   GPLv3 Open Source
 * @link       http://jvitals.com
 * @since      File available since initial release
 */
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class TopicIconsModel {
	function loadAll() {
		// this is a rewrite of the chunk commented below
		// hopefully this accomplishes the same thing (with overrides)
		$topic_icons = array();
		foreach (range(1,10) as $i) {
			$file = Agora::image("icons/$i.png");
			if (!empty($file)) {
				$topic_icons[] = $i;
			}
		}
		return $topic_icons;
		/*
		$icons = array('1.png', '2.png', '3.png', '4.png', '5.png', '6.png', '7.png', '8.png', '9.png', '10.png');
		$d = dir(AGORA_PATH.'img'.DS.'icons');
		$topic_icons = array();
		while (($entry = $d->read()) !== false) {
			//if (substr($entry, strlen($entry)-4) == '.png')
			if (in_array($entry, $icons)) {
				$topic_icons[] = substr($entry, 0, strlen($entry)-4);
			}
		}
		$d->close();
		return $topic_icons;
		*/
	}
}


?>
